package com.meeting.y.controller;

import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import org.apache.commons.collections4.map.LinkedMap;

import java.util.Map;

public class ParamType {

    public static String ClassTotalType = "[{key:'done',name:'已上'},{key:'will',name:'待上'},{key:'ydy',name:'一对一'},{key:'qjb',name:'秋季班'}," +
            "{key:'ttb',name:'团体班'},{key:'teacleave',name:'师假'},{key:'studleave',name:'生假'}]";

    public static Map<String,String> getClassTotalType(){
        JSONArray jsonArray = JSONArray.parseArray(ClassTotalType);
        Map _result = new LinkedMap<String,String>();
        for(int i=0 ; i < jsonArray.size() ;i++)
        {
            //获取每一个JsonObject对象
            JSONObject myjObject = jsonArray.getJSONObject(i);
            _result.put(myjObject.get("key"),myjObject.get("name"));
        }
        return _result;
    }
}
